package abaco.symbol;

import abaco.Symbol;
import abaco.gui.Panel;

public class Function extends Mathematical {
	public final static String NAME = "function-name";
	public final static String ARGUMENT = "function-argument";

	@Override
	public Symbol buildPanel(Panel panel) {
		return this;
	}

	@Override
	public String toLatex() {
		StringBuilder latex = new StringBuilder();
		latex.append("{");
		latex.append(nameToLatex());
		latex.append("\\left(");
		latex.append(toLatex(ARGUMENT));
		latex.append("\\right)}");
		return latex.toString();
	}

	protected String nameToLatex() {
		return toLatex(NAME);
	}
}
